<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
	<head>
		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
		<title>绩效分配-店铺详情</title>
		<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/scriptvalidator.js" type="text/javascript"></script>
		<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
		<script language='javascript'>
		<s:if test="resultBoolean && popMessage!= null">
			alert("${popMessage}");
		</s:if>
			function checkSubmit(){
			 	var staffForm = document.form1;
				if(!Validator.Validate(staffForm, 3)) {
					return false;
				}
			}
			
		 function go_back(){
		 	var url =  "<s:property value='contextPath'/>/pm/assign/edit.do?parent.id=${parent.id}";
		 	location.href=url;
		 }
		 
		 function editData(id) {
				var searchForm = document.searchForm;
				searchForm.action = "<s:property value='contextPath'/>/pm/assign/editShopMonthDetail.do?currentPage=${currentPage}&monthEntity.id="+id;
				searchForm.submit();
			}
		</script>
	</head>
	<body leftmargin='8' topmargin='8'>
		<div class="navigation">
	    <span><a href="javascript:go_back();"><img src="${contextPath}/images/back_nav_btn.png" /></a>
	    <a href="javascript:go_back();">返回</a>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="<s:property value='contextPath'/>/pm/assign/editShopDetail.do?currentPage=${currentPage}&entity.id=${entity.id}"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="<s:property value='contextPath'/>/pm/assign/editShopDetail.do?currentPage=${currentPage}&entity.id=${entity.id}">刷新</a>
	    </span>绩效管理&gt;&gt;绩效分配&gt;&gt;店铺详情
	    
   		 </div>
	<form name="form1" action="updateShopDetail.do?entity.id=<s:property value='entity.id'/>" onsubmit="return checkSubmit();" method="post">   		 
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
			<tr>
				<td align="center" valign="top" bgcolor="#FFFFFF">
					<div class="xt_main_right_center">

		<table width="100%" border="0" cellpadding="1" cellspacing="1">
		<tr>
			<td class="left-td-width-bg">
				4S店:
			</td>
			<td class="right-td-width-bg-left">
				(<s:property value="entity.shop.shopMark"/>)<s:property value="entity.shop.shopName"/>
			</td>
			<td class="left-td-width-bg">
				区域经理：
			</td>
			<td class="right-td-width-bg-left">
				 <s:if test="entity.areaUsers != null">
		  			<s:property value="@com.jysz.webcore.utils.ReflectionUtils@convertElementPropertyToString(entity.areaUsers,'realName',',')"/>
	  			</s:if>
			</td>			
			<td class="left-td-width-bg">
				驻店(顾问)绩效：
			</td>
			<td class="right-td-width-bg-left">
				<s:property value="entity.totalAmount"/>
			</td>		
	
			<td class="left-td-width-bg">
				区域(经理)所有店绩效：
			</td>
			<td class="right-td-width-bg-left">
				${areaTotalAmount}
			</td>			
		</tr>
		<tr>
			<td class="left-td-width-bg">
				管理费总计:
			</td>
			<td class="right-td-width-bg-left">
				<s:property value="entity.payinAmount"/>
			</td>
			<td class="left-td-width-bg">
				区域(经理)当前店绩效：
			</td>
			<td class="right-td-width-bg-left">
			${entity.areaTotalAmount}
			</td>	
			<td class="left-td-width-bg">
				所属区域：
			</td>
			<td  class="right-td-width-bg-left">
				${entity.shop.area.name}
			</td>				
			<td class="left-td-width-bg">
				备注：
			</td>
			<td  class="right-td-width-bg-left" >
				<input type="text" class="input" name="entity.remark" value="${entity.remark}"/>
			</td>			
		</tr>		
	</table>
						
						
	<br/><br/>
	
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
		    <td height="25" align="left"><font color="#0066CC"><strong>实收月份列表：</strong></font></td>
		    <td height="25" align="right">
		    	未收全款的金融机构管理费显示为<font color="green">绿色</font>
            </td>
		  </tr>
		</table>
		      
        <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
		  <tr>
    		        <td width="5%" class="top-td-width-bg">序号</td>
    		        <td width="6%" class="top-td-width-bg">当月入库</td>
				    <td width="6%" class="top-td-width-bg">上月结余</td>
				     <td width="13%" class="top-td-width-bg">金融机构</td>
				    <td width="8%" class="top-td-width-bg">管理费金额</td>
				    <td width="8%" class="top-td-width-bg">收取月份</td>
				    <td width="8%" class="top-td-width-bg">驻店顾问绩效</td>
				    <td width="8%" class="top-td-width-bg">区域经理绩效</td>
				    <td width="28%" class="top-td-width-bg">备注</td>
			        <td width="8%" class="top-td-width-bg">操作</td>
		  </tr>
		  
 <s:iterator value="paShopMonthDetails" status="s" id="paShopMonthDetail">
	<tr> 
	  <td class="down-center-td-width-bg">${s.index+1}</td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="currenMonthInQty"/>
	  </td>
	  <td class="down-center-td-width-bg">
	 	 <s:property value="preMonthInQty"/>
	  </td>
	  <td class="down-left-td-width-bg">
	  	<s:if test="billOptions != null">
	  		 <s:iterator value="billOptions" id="billOption">
		  		 <s:if test="billOption.lessThan != null && billOption.lessThan == 1">
		  		 	<font color="green"><s:property value="#billOption.financial.name"/>(<s:property value="#billOption.amount"/>)</font>
		  		 </s:if>
		  		 <s:else>
		  		 	<s:property value="#billOption.financial.name"/>(<s:property value="#billOption.amount"/>)
		  		 </s:else>
	  		 	&nbsp;
	  		 </s:iterator>
	  	</s:if>
	  </td>	  
	  <td class="down-center-td-width-bg">
		   <s:property value="payinAmount"/>
	  </td>
	  <td class="down-center-td-width-bg">
		  <s:property value="monthDate"/>
	  </td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="totalAmount"/>
	  </td>
	  <td class="down-center-td-width-bg">
	  	<s:property value="areaTotalAmount"/>
	  </td>
	  <td class="down-left-td-width-bg">
	  	<s:property value="remark"/>
	  </td>
	  <td class="down-center-td-width-bg">
	   <a href="<s:property value='contextPath'/>/pm/assign/editShopMonthDetail.do?currentPage=${currentPage}&monthEntity.id=<s:property value="id"/>"><img src="${contextPath}/images/edit.gif" alt="编辑" width="16" height="13" border="0" /></a>
<%-- 	    <a href="javascript:editData(<s:property value="id"/>);"><img src="${contextPath}/images/edit.gif" alt="编辑" width="16" height="13" border="0" /></a> --%>
	  </td>
	</tr>
</s:iterator>		  
		</table>	
					</div>
				</td>
			</tr>
		</table>
		<br/>
	 <table width="100%">
            	<tr>
                	<td><div align="center">
                	  <input type="submit" name="submit" value="  " class="btn_save" />
                	&nbsp;&nbsp;
                      <input type="reset" name="reset" value="  " class="btn_rest" onclick="clearForm(this.form);return false;"/>
                    </div>
                    </td>
                </tr>
     	</table>   	
</form>     		
		<br/><br/><br/><br/><br/>
		<div><jsp:include page="/include/footer.inc"></jsp:include></div>
	</body>
</html>